<%@page import="metier.Propriete"%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
    <jsp:useBean id="lutilisateur" class="metier.User" scope="session"></jsp:useBean>
    <jsp:useBean id="lesProprietes" class="metier.Propriete" scope="session"></jsp:useBean>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
	<title>Hellenic</title>

 <link type="text/css" rel="stylesheet" href="../css/bootstrap.css"/>
 <link type="text/css" rel="stylesheet" href="../css/style.css"/>
</head>
<body>	
	<%
	String login = request.getParameter("login");
	String pwd = request.getParameter("pwd");
	if(login != null && pwd != null){
		lutilisateur.setLogin(login);
		lutilisateur.setPwd(pwd);
		if(lutilisateur.verifConnexion(login, pwd))
		{
			//TODO mettre BackOffice.jsp
			response.sendRedirect("bien.jsp");
		}
		else
		{%>
			<p>Erreur d'identification</p>
		<%
		}
	}
	%>

	<div class="container">
		<form action="/hellenic/accueil.jsp" method="post" class="form-inline" id="connexion">
			<legend>Connexion</legend>
			<div class="control-group">
				<input type="text" name="login" placeholder="Login" >
			</div>
			<div class="control-group">
				<input type="password" name="pwd" placeholder="PassWord">
			</div>
			<input type="submit" value="Validez" class="btn">
		</form>
	</div>
		<footer>
		</footer>
	</div>
</html>